from math import *
RSiRSe=0
SommeR=0
print ("Bienvenue en Thermique")
print ("")
print ("Paroie ?")
print ("    (1) verticale (sup 60°)")
print ("    (2) horiz. (plafond)")
print ("    (3) horiz. (plancher)")
print ("")
Choix1=int(input("faire le choix [1;2;3] "))
print (" - - - - - - - - -")
print ("Autre cote du mur ?")
print ("(0) Rsi + Rse custom")
print ("(1) ext.        (4) local N chau.")
print ("(2) pas. ouv.   (5) vide san.")
print ("(3) local couv. (6) comble")
Choix2=int(input("choix [1 - 6] ? "))
if 3<Choix2 and Choix2<=6:
	Choix2=2
if 0<Choix2 and Choix2<=3:
	Choix2=1
if (Choix1==1 and Choix2==1):
	print ("RSi = 0.13")
	print ("RSe = 0.04")
	RSiRSe=0.17
if (Choix1==2 and Choix2==1):
	print ("RSi = 0.10")
	print ("RSe = 0.04")
	RSiRSe=0.14
if (Choix1==3 and Choix2==1):
	print ("RSi = 0.17")
	print ("RSe = 0.04")
	RSiRSe=0.121
if (Choix1==1 and Choix2==2):
	print ("RSi = 0.13")
	print ("RSe = 0.13")
	RSiRSe=0.26
if (Choix1==2 and Choix2==2):
	print ("RSi = 0.10")
	print ("RSe = 0.10")
	RSiRSe=0.20
if (Choix1==3 and Choix2==2):
	print ("RSi = 0.17")
	print ("RSe = 0.17")
	RSiRSe=0.34
if RSiRSe==0:
	RSiRSe=float(input("Saisir RSi + RSe ? "))
SommeR=SommeR+RSiRSe
print (" - - - - - - - - -")
Choix3=int(input("Nombre elements ? "))
print ("Epaisseur<0 = sortie")
i=1
while Choix3>0:
	iprint= "Couche n " + str (i)
	print (iprint)
	Epaisseur=float(input("Epaisseur (m) ? "))
	Lambda=float(input("Lambda ? "))
	if Epaisseur<0:
		break
	if Epaisseur==0 or Lambda==0:
		print ("Couche non valide")
		Ri=float(input("Ri ? "))
	else:
		Ri=Epaisseur/Lambda
	Ri=round(Ri,3)
	Riprint= "Ri = " + str (Ri)
	print (Riprint)
	SommeR=SommeR+Ri
	Choix3=Choix3-1
	i=i+1
print (" - - - - - - - - -")
print ("La paroie a un R de :")
SommeR=round(SommeR,3)
print (SommeR)
print ("(m2.K)/W")
print ("La paroie a un U de :")
SommeR=round(1/SommeR,6)
print (SommeR)
print ("W/(m2.K)")
print (" - - - - - - - - -")

Choix=int(input("PAUSE"))